//ybzuo
//2010.03
//UI Base Interface
//big princess...

#pragma once
#include "iltdrawprim.h"
#include "ui_enums.h"
class i_UIeffect;
class i_UIelement
{
	public:
		//====================for all

		//set the compote's info
		virtual void set_compote_size( float  _w,float _h)=0;
		virtual void set_compote_position(float _x,float _y )=0;


		//----------------render
		virtual void render()=0;

		//----------------update
		virtual void update()=0;

		//---------------- effect op
		virtual void add_effect(i_UIeffect* _effect)=0;
		virtual void remove_effect(UI_effect_id id)=0;
		

        //----------------position
		//valuerange is [0,1] 
		//comparative values;not the really Screen pixel units
		virtual void set_position(float _x,float _y)=0;
		virtual void set_x(float _x)=0;
		virtual void set_y(float _y)=0;
		virtual float get_x()const =0;
		virtual float get_y()const =0;

		//------------------z-buffers
		virtual void set_zbuffer(float _z)=0;
		virtual float get_zbuffer()const=0;

		//------------------rotate
		virtual void set_angle(float _an)=0;
		virtual float get_angle()const=0;

		//-----------------sizes
		//set/change sizes
		//valuerange is [0,1] 
		//comparative values;not the really Screen pixel units
		virtual void set_size(float _width,float _height)=0;
		virtual float get_width()const =0;
		virtual float get_height()const =0;
		virtual void scale(float _widthS,float _heightS)=0;
		virtual float get_scale_x()const=0;
		virtual float get_scale_y()const=0;

		//-----------------color
		virtual void set_color(uint8 _a,uint8 _r,uint8 _g,uint8 _b)=0;
		virtual uint8 get_alpha()const =0;
		virtual uint8 get_red()const=0;
		virtual uint8 get_green()const =0;
		virtual uint8 get_blue()const =0;
		virtual void set_color(uint32 _color)=0;
		virtual uint32 get_color()const=0;

		//====================for surface
		virtual void set_tex(HTEXTURE _tex)=0;
		virtual HTEXTURE get_tex()=0;
		virtual void set_uv(float _umin,float _umax,float _vmin,float _vmax)=0;
		virtual void set_umin(float _umin)=0;
		virtual void set_umax(float _umax)=0;
		virtual void set_vmin(float _vmin)=0;
		virtual void set_vmax(float _vmax)=0;
		virtual float get_umin()const=0;
		virtual float get_umax()const=0;
		virtual float get_vmin()const=0;
		virtual float get_vmax()const=0;

		//===================for text
		virtual void set_value(const wchar_t* str)=0;
		virtual const wchar_t* get_value()=0;
		virtual void set_font_face(const wchar_t* _face)=0;
		//=====================destory
		virtual ~i_UIelement(){}
	private:
		


};